﻿Imports Control_Vuelos_BL

Public Class frmSegCambiarContrasena
    Public m_coduser As String
    Private ReadOnly oUsuario As New UsuarioBL()

    Private Sub frm_SegCambiarContrasena_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        npMain.Text = "El usuario ha de cerrar la sesión y volver a abrirla para que los cambios tengan efecto"
    End Sub

    Private Sub gcmdok_Click(sender As System.Object, e As System.EventArgs) Handles gcmdok.Click
        If DxValidationProvider1.Validate Then
            If gpswuser.EditValue.Equals(gcnfuser.EditValue) Then
                If oUsuario.pr_RestablecerContrasena(m_coduser, gpswuser.EditValue) Then
                    Close()
                End If
            End If
        End If
    End Sub

    Private Sub cmdcancel_Click(sender As System.Object, e As System.EventArgs) Handles cmdcancel.Click
        Close()
    End Sub

End Class